import java.util.Scanner;
public class jc {
    public static void main(String [] arry)
    {
        Scanner sc=new Scanner(System.in);
        int a=sc.nextInt();
        S(a);
    }
    public static void S(int a)
    {
        long sum=0;
        for(int i=1;i<=a;i++)
        {
            int s=1;
            for(int j=1;j<=i;j++)
            {
                s=s*j;

            }
            sum+=s;
        }
        for(int i=1;i<=a;i++)
        {
            System.out.printf("%d!",i);
            if(i==a)
                System.out.printf("=");
            else
                System.out.printf("+");
        }
        System.out.println(sum);
    }
}
